﻿<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" autoFlush="true"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<span class="title1">捐赠礼品</span>
<table class="qlist" width="100%" align="center" cellpadding="0" cellspacing="0" style="background-color:#FAFCFC;border:1px solid #ccc;">
    <html:form action="/shoparticle" method="post" onsubmit="return validate(this);" enctype="multipart/form-data">
    <html:hidden property="action" value="contribute"/>
    <html:hidden property="id" />
    <tr>
    	<td align="left" colspan="2">
    		&nbsp;&nbsp;&nbsp;&nbsp;1）	目前仅接受书籍资料的捐赠，内容包括职场类，励志类，管理类，业务类，技术类书籍或者资料。<br>
    		&nbsp;&nbsp;&nbsp;&nbsp;2）	收到您的捐赠的物品后，我们会为其评估一个等值网站积分，一旦该物品被网友兑换之后，该相应的积分值就会奖励到您的ID。<br>
    		&nbsp;&nbsp;&nbsp;&nbsp;3）	一份付出，一份回报，让大家一起分享您的知识财富！
    	</td>
    </tr>
    <tr>
    	<td>&nbsp;</td>
    </tr>
    <tr>
    	<td align="center" colspan="2">物品信息</td>
    </td>
    <tr>
        <td align="right" width="25%">名称</td>
        <td>
            <html:text property="articleName" size="60" maxlength="45"/>
        </td>
    </tr>
    <tr>
        <td align="right" width="25%">描述</td>
        <td>
            <html:textarea property="articleDescription" cols="65" rows="15"/>
        </td>
    </tr>
    <tr>
        <td align="right" width="25%">数量</td>
        <td>
            <html:text property="articleQuantity" size="2" maxlength="3"/>
        </td>
    </tr>
    <tr>
    	<td align="center" colspan="2">个人信息</td>
    </td>
    <tr>
        <td align="right" width="25%">真实姓名</td>
        <td>
            <html:text property="realName" size="60" maxlength="10"/>
        </td>
    </tr>
    <tr>
        <td align="right">联系方式</td>
        <td>
        	<html:text property="contact" size="60" maxlength="45"/>
        </td>
    </tr>
  	<tr>
    	<td align="right">电子邮箱</td>
    	<td><html:text property="email" size="60" maxlength="45"/></td>
  	</tr>
    <tr>
    	<td align="right">验证码</td>
        <td>
            <input type="text" name="vc" value="" size="8">*(输入右边图片上的数字)<img src="<%=request.getContextPath()%>/vcimg" width="40" height="20" border="0"/>&nbsp;&nbsp;&nbsp;<input type="submit" value="捐赠"/>
        </td>
    </tr>
    </html:form>
</table>
<script type="text/javascript">
    function validate(pForm)
    {
        var articleName = pForm.articleName.value;
        if(articleName == "")
        {
            alert("[名称]必须");
            pForm.articleName.focus();
            return false;        
        }
        var articleDescription = pForm.articleDescription.value;
        if(articleDescription == "")
        {
            alert("[描述]必须");
            pForm.articleDescription.focus();
            return false;        
        }
        var articleQuantity = pForm.articleQuantity.value;
        if(articleQuantity == "")
        {
            alert("[数量]必须");
            pForm.articleQuantity.focus();
            return false;        
        }
        var realName = pForm.realName.value;
        if(realName == "")
        {
            alert("[真实姓名]必须");
            pForm.realName.focus();
            return false;        
        }
        var contact = pForm.contact.value;
        if(contact == "")
        {
            alert("[联系方式]必须");
            pForm.contact.focus();
            return false;        
        }
        var email = pForm.email.value;
        if(email == "")
        {
            alert("[电子邮箱]必须");
            pForm.email.focus();
            return false;
        }
        return true;
    }
</script>